﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KylinORM.Utils;

namespace KylinORM.Message
{
    /// <summary>
    /// 消息访问类管理器
    /// </summary>
    public abstract class MessageProvider
    {
        static MessageProvider()
        {
            IOCContainer.RegisterType(typeof(IMessageProvider), ConfigManager.DefaultMessageProvider);
        }

        /// <summary>
        /// 得到已注册的消息访问类
        /// </summary>
        /// <returns></returns>
        public static IMessageProvider GetInstance()
        {
            return IOCContainer.Singleton<IMessageProvider>();
        }

    }
}
